﻿<%@ Page Title="Thêm Nội Dung DV" Language="C#" MasterPageFile="~/sitemanagement/MasterPage.master" AutoEventWireup="true" CodeFile="AddServices.aspx.cs" Inherits="sitemanagement_AddServices" %>

<%@ Register assembly="CuteEditor" namespace="CuteEditor" tagprefix="CE" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link rel="Stylesheet" type="text/css" href="css/postnews.css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    Thêm Nội Dung Dịch Vụ
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div>
        <div id="postcontent">
            <table width="100%">
                <tr>
                    <td colspan="3" align="center">
                        <asp:Label ID="lblMsg" runat="server" Text="" CssClass="msgtext"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="newsname">Danh mục:</td>
                    <td class="newsvalue">
                        <asp:DropDownList ID="ddlCate" runat="server" CssClass="dropdown">
                        </asp:DropDownList>
                    </td>
                    <td class="newsvalidate"></td>
                </tr>
                <tr>
                    <td class="newsname">Tiêu đề dịch vụ:</td>
                    <td class="newsvalue">
                        <asp:TextBox ID="txtTitle" runat="server" CssClass="mini"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                            ControlToValidate="txtTitle" CssClass="valvalue" Display="Dynamic" 
                            ErrorMessage="Vui lòng nhập tiêu đề !!" ForeColor="Red" SetFocusOnError="True"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                            ControlToValidate="txtTitle" CssClass="valvalue" Display="Dynamic" 
                            ErrorMessage="Tiêu đề không hợp lệ !!" ForeColor="Red" SetFocusOnError="True" 
                            ValidationExpression="[^']{2,100}"></asp:RegularExpressionValidator>
                    </td>
                    <td class="newsvalidate"></td>
                </tr>
                <tr>
                    <td class="newsname">Hình ảnh:</td>
                    <td class="newsvalue">
                        <asp:FileUpload ID="fileImage" runat="server" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                            ControlToValidate="fileImage" CssClass="valvalue" Display="Dynamic" 
                            ErrorMessage="Vui lòng chọn một hình !!" ForeColor="Red" SetFocusOnError="True"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" 
                            ControlToValidate="fileImage" CssClass="valvalue" Display="Dynamic" 
                            ErrorMessage="Tên hình không hợp lệ !!" ForeColor="Red" SetFocusOnError="True" 
                            ValidationExpression="^([0-9a-zA-Z_\-~ :\\])+(.jpg|.JPG|.jpeg|.JPEG|.bmp|.BMP|.gif|.GIF|.png|.PNG)$"></asp:RegularExpressionValidator>
                    </td>
                    <td class="newsvalidate"></td>
                </tr>
                <tr>
                    <td class="newsname nd">Nội dung:</td>
                    <td class="newsvalue">
                        <CE:Editor ID="txtContent" runat="server">
                        </CE:Editor>
                    </td>
                    <td class="newsvalidate"></td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td>
                        <asp:RequiredFieldValidator ID="valContent" runat="server" 
                            ErrorMessage="Vui lòng nhập nội dung !!" ControlToValidate="txtContent" 
                            Display="Dynamic" ForeColor="Red" SetFocusOnError="True" CssClass="valtext"></asp:RequiredFieldValidator>
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td class="newsbutton">&nbsp;</td>
                    <td class="newsbutton">
                        <asp:Button ID="btnPost" runat="server" CssClass="nbutton" Text="Đăng Tin" 
                            onclick="btnPost_Click" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:Button ID="btnReset" runat="server" CssClass="nbutton" Text="Làm Mới" 
                            ValidationGroup="Reset" onclick="btnReset_Click" />
                    </td>
                    <td class="newsbutton">&nbsp;</td>
                </tr>
            </table>
        </div>
    </div>
</asp:Content>

